package com.yuelife.admin.feignclient;

import com.yuelife.admin.pojo.MProduct;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "market")
public interface ProductServiceClient {

    //微服务的添加，往redis中添加一条商品数据
    @PostMapping("/pro/updataRedisProduct")
    void updataRedisProduct(MProduct mProduct);

    //微服务的删除，后台删除商品时，需要删除redis中的商品数据
    @DeleteMapping("/pro/deleteRedisProduct")
    void deleteRedisProduct(@RequestParam("productSn") String productSn);


}
